<template>
	<activity-list :data="activities" @handleClick="handleSelfActive"></activity-list>
</template>

<script>
	import {
		getAllEndActivity
	} from "@/api/supervise/work.js"
	export default {
		data() {
			return {
				activities: [],
			}
		},
		methods: {
			getActives() {

				getAllEndActivity().then(res=>{
					console.log(res)
					this.activities = res.activities;
				
				})
			},
			handleSelfActive(activity) {
				uni.setStorageSync("activityId",activity.id)
				//uni.setStorageSync("activityState",activity.state)
				this.$tab.navigateTo("/pages/work/rectifyFeedback/rectify-notice-list")
			}
		},
		onLoad: function() {
			this.getActives()
		}
	}
</script>